module.exports = {
    api: {
        app_group_menu: {
            sort: {
                level: 1,
                sort: -1
            },
            projection: {
                menuId: 'id'
            },
            join: {
                menuId: {
                    type: 'INNER',
                    name: 'menu',
                    key: 'id',
                    query: {
                        status: {
                            $ne: 0
                        },
                        isWecom: 0,
                        state:1
                    },
                    projection: {
                        name: 1,
                        sort: 1,
                        url: 1,
                        parentId: 1
                    }
                }
            }
        },
        app_group_menu_wecom: {
            sort: {
                level: 1,
                sort: -1
            },
            projection: {
                menuId: 'id'
            },
            join: {
                menuId: {
                    type: 'INNER',
                    name: 'menu',
                    key: 'id',
                    query: {
                        status: {
                            $ne: 0
                        },
                        isWecom:1,
                        state:1
                    },
                    projection: {
                        name: 1,
                        sort: 1,
                        url: 1,
                        parentId: 1,
                        img:1
                    }
                }
            }
        }
    },
    models:{
        isWecom: {
            label: '企业微信功能',
            defaultValue: 0,
            type: 'switch'
        },
        img: {
            attr:{limit:1},
            type: 'image'
        }
    }
}